package appapi.entity.bridge;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import java.time.LocalDateTime;
import java.util.Date;
import java.io.Serializable;

/**
 * 设备报警记录(DeviceAlarm)实体类
 *
 * @author hlm
 * @since 2023-09-15 10:20:01
 */
@Data
@ApiModel
@TableName("device_alarm")
public class DeviceAlarm implements Serializable {
    private static final long serialVersionUID = 615441184765340345L;
    /**
     * ID
     */
    @ApiModelProperty(value = "自编号设备报警记录Id")
    @TableId(value = "id" , type = IdType.AUTO)
    private Long id;
    /**
     * 设备sn
     */
    @ApiModelProperty(value = "设备sn")
    private String deviceSn;
    /**
     * 告警内容
     */
    @ApiModelProperty(value = "告警内容(告警类型)")
    private String alarmDetail;
    /**
     * 告警对象
     */
    @ApiModelProperty(value = "告警对象")
    private String alarmSource;
    /**
     * 告警来源
     */
    @ApiModelProperty(value = "告警来源")
    private String alarmKind;
    /**
     * 告警级别
     */
    @ApiModelProperty(value = "告警级别(告警等级)")
    private Integer alarmLevel;
    /**
     * 时间戳
     */
    @ApiModelProperty(value = "时间戳（告警时间）")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime timeStamp;
    /**
     * 是否触发
     */
    @ApiModelProperty(value = "是否触发")
    private Integer alarmTrigger;
    /**
     * 告警实际值
     */
    @ApiModelProperty(value = "告警实际值")
    private String alarmValue;
    /**
     * 力矩百分比
     */
    @ApiModelProperty(value = "力矩百分比")
    private String alarmRate;
    /**
     * 添加时间
     */
    @ApiModelProperty(value = "添加时间")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime createTime;
    /**
     * 告警状态 0待处理 1已恢复 2已处置
     */
    @ApiModelProperty(value = "告警状态 0待处理 1已恢复 2已处置(处理状态)")
    private Integer alarmStatus;
    /**
     * 恢复类别 0自动恢复 1手动恢复
     */
    @ApiModelProperty(value = "恢复类别 0自动恢复 1手动恢复")
    private Integer alarmRestoreType;
    /**
     * 恢复时间
     */
    @ApiModelProperty(value = "恢复时间")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime restoreTime;
    /**
     * 处置时间
     */
    @ApiModelProperty(value = "处置时间")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime handleTime;
    /**
     * 审核状态
     */
    @ApiModelProperty(value = "审核状态")
    private Integer auditStatus;
    /**
     * 审核备注
     */
    @ApiModelProperty(value = "审核备注")
    private String auditNote;


}

